up: programming - C - time related next: programming - C - functions - clock()
Programming C
asctime() function
What links here?
char * asctime ( const struct tm * timeptr );
Convert tm structure to string

Interprets the contents of the tm structure pointed by timeptr as a calendar time and converts it to a C string containing a human-readable version of the corresponding date and time.

The returned string has the following format:

Www Mmm dd hh:mm:ss yyyy


Where Www is the weekday, Mmm the month in letters, dd the day of the month, hh:mm:ss the time, and yyyy the year.

The string is followed by a new-line character ('\n') and the terminating null-character.

Parameters



Return Value

A C string containing the date and time information in a human-readable format. The array which holds this string is statically allocated and shared by both the ctime and asctime functions. Each time either one of these functions is called the content of this array is overwritten.

www.cplusplus.com
programming - c - functions - asctime()
filename:programming - c - functions - asctime()
filename:programming%20%2D%20c%20%2D%20functions%20%2D%20asctime%28%29
last edit:April 19 2012 21:58:20 (4399 days ago)
ct = 1714965546.000000 = May 05 2024 23:19:06
ft = 1334887100.000000 = April 19 2012 21:58:20
dt = 380078446.000000